/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.opensudoku.root.concrete;

import org.opensudoku.root.exceptions.InvalidBoxEntryException;
import org.opensudoku.root.exceptions.InvalidDimensionException;
import org.opensudoku.root.vsb.VirtualSudokuBoard;

/**
 *
 * @author sony
 */
public class ConcreteSupportClass {

    public static VirtualSudokuBoard ReturnVsbObject(VirtualSudokuBoard vsb) throws InvalidDimensionException, InvalidBoxEntryException
    {
        return new VirtualSudokuBoard(vsb.ReturnBoard());
    }

    public static boolean CheckForPlacement(VirtualSudokuBoard vsb,int row,int col,int ele) throws InvalidDimensionException
    {
        return (!vsb.isInRow(ele, row))&&(!vsb.isInColumn(ele, col))&&(!vsb.isInSquare(ele, VirtualSudokuBoard.getSquare(row, col)));
    }
}
